-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for CLI flag for mTLS client certificate key passphrase #5494
Add support for CLI flag for mTLS client certificate key passphrase #5494
Conversation
This pull request does not have a backport label. Could you fix it @AndersonQ? 🙏
|
5c9c606
to
3351e32
Compare
cd98d59
to
2c94c5b
Compare
absPath, err := filepath.Abs("/path/to/token") | ||
require.NoError(t, err, "could not get absolute absPath") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly do not know why it was working on windows before, but it started to fail on elastic-agent-cert-key does not require key-passphrase
, so I fixed all tests.
|
cbdb682
to
1fa216d
Compare
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
It adds support for encrypted client certificate key during install/enroll, which done by the cli flag `--elastic-agent-cert-key-passphrase`.
c4dcbdf
to
4d283ea
Compare
Quality Gate passedIssues Measures |
…5494) (#5574) It adds support for encrypted client certificate key during install/enroll, which done by the cli flag `--elastic-agent-cert-key-passphrase`. (cherry picked from commit 346e5be) Co-authored-by: Anderson Queiroz <[email protected]>
…lastic#5494) It adds support for encrypted client certificate key during install/enroll, which done by the cli flag `--elastic-agent-cert-key-passphrase`.
What does this PR do?
It adds support for encrypted client certificate key during install/enroll, which done by the cli flag
--elastic-agent-cert-key-passphrase
.Why is it important?
It enables Elastic Agent to be configured with passphrase-protected private keys for client mTLS certificates.
Checklist
[ ] I have made corresponding change to the default configuration files./changelog/fragments
using the changelog tool[ ] I have added an integration test or an E2E testAuthor's checklist
Tests
--elastic-agent-cert-key-passphrase
adheres to the same requirements as--fleet-server-cert-key-passphrase
.--elastic-agent-cert-key
and--elastic-agent-cert
are provided when--elastic-agent-cert-key-passphrase
is present.*enrollCmdOption.remoteConfig()
accurately incorporates the passphrase intotlscommon.CertificateConfig
.fleetclient.NewWithConfig
generates a valid client capable of establishing an mTLS connection to a mock server.policy with SSL config
to ensure the client certificate key passphrase from the cli is not left in the config when the policy's client client certificate key is not passphrase-protected.Disruptive User Impact
How to test this PR locally
Related issues
Questions to ask yourself